package com.qf.service.impl;



import com.qf.pojo.City;
import com.qf.mapper.CityMapper;
import com.qf.service.CityService;
import com.qf.vo.VoCity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CityServiceImpl implements CityService {

    @Autowired
    private CityMapper cityMapper;



    @Override
    public VoCity citys(Integer getid, Integer backid) {
        City city1 = cityMapper.selectCityById(getid);
        City city2 = cityMapper.selectCityById(backid);
        VoCity voCity = new VoCity();
        voCity.setGetCity(city1);
        voCity.setBackCity(city2);

        return voCity;
    }

    @Override
    public List<City> findCityById(Integer pid) {
        List<City> list=cityMapper.seekCityById(pid);
        if (list!=null){
            return list;
        }
        return null;
    }
}
